#include "machineparam.h"
#include "machinemgr.h"



void MachineWirteParam::setFatalWarn(bool b)
{
    m_fatalWarn = b;
}

void MachineWirteParam::setlightWarn(bool b)
{
    m_lightWarn = b;
}

void MachineWirteParam::setDirection(Direction d)
{
    m_direction =d;
}

void MachineWirteParam::setLeftSpeed(unsigned int speed)
{
    if( speed > 3000)
    {
        speed = 3000;
    }

    m_leftSpeed = speed;
}

void MachineWirteParam::setRightSpeed(unsigned int speed)
{
    if( speed > 3000)
    {
        speed = 3000;
    }

    m_rightSpeed = speed;
}

void MachineWirteParam::setEnable(bool b)
{
    m_enable = b;
}

bool MachineWirteParam::getFatalWarn()
{
    return m_fatalWarn;
}

MachineReadParam::MachineReadParam()
{
     m_direction =Direction::D_Invalid;
}

bool MachineReadParam::getFatalWarn()
{
    return m_fatalWarn;
}

bool MachineReadParam::isLoseNet()
{
    return m_bLoseNet;
}

Direction MachineReadParam::getDirection()
{
    return m_direction;
}

unsigned int MachineReadParam::getLeftSpeed()
{
    return m_leftSpeed;
}

unsigned int MachineReadParam::getRightSpeed()
{
    return m_rightSpeed;
}

bool MachineReadParam::getMashineState()
{
    return m_bStart;
}
